<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="author" content="esy">
    
    <meta name="description" content="esy">
    
    
    
    
    
    
    <title>matlab中的插值 | ESY</title>
    <link href="https://esyyes.github.io" rel="prefetch" />

    
<link rel="stylesheet" href="/css/bootstrap.min.css">
<link rel="stylesheet" href="/css/aos.css">
<link rel="stylesheet" href="/css/style.css">

    
<script src="/js/jquery.min.js"></script>

    
<script src="/js/bootstrap.min.js"></script>

    
<script src="/js/aos.js"></script>

    
<script src="/js/highslide/highslide-full.min.js"></script>

    
<link rel="stylesheet" href="/js/highslide/highslide.css">

    <style type="text/css">
        @media (max-width: 768px) {
            body {
                background-color: #f0f0f0;
                background: url('/imgs/xsbg.gif');
                background-attachment: fixed;
            }
        }
    </style>
    
    <!--<script type="text/javascript">
      if (document.images) {
        var avatar = new Image();
        avatar.src = '/imgs/avatar.jpg'
        var previews = 'preview1.jpg,preview2.jpg,preview3.jpg,preview4.jpg'.split(',')
        var previewsPreLoad = []
        for(var i = 0; i < length; i++) {
          previewsPreLoad.push(new Image())
          previewsPreLoad[previewsPreLoad.length - 1].src = '/imgs/preview' + previews[i]
        }
      }
    </script>-->
<meta name="generator" content="Hexo 5.2.0"></head>
<body>
    <!-- 背景轮播图功能 -->
    <section class="hidden-xs">
    <ul class="cb-slideshow">
        <li><span>天若</span></li>
        <li><span>有情</span></li>
        <li><span>天亦老</span></li>
        <li><span>我为</span></li>
        <li><span>长者</span></li>
        <li><span>续一秒</span></li>
    </ul>
</section>
    <!-- 欧尼酱功能, 谁用谁知道 -->
    
    <div class="gal-menu gal-dropdown">
    <div class="circle" id="gal">
        <div class="ring">
            <a href="https://esyyes.github.io" class="menuItem" style="left: 50%; top: 15%;">首页</a>
            
            <a class="menuItem" style="left: 80.3109%; top: 32.5%;">下一页</a>
            
            <a href="/archives" class="menuItem" style="left: 80.3109%; top: 67.5%;">归档</a>
            <a href="/about" class="menuItem" style="left: 50%; top: 85%;">关于</a>
            <a href="/message" class="menuItem" style="left: 19.6891%; top: 67.5%;">留言板</a>

            
            <a class="menuItem" style="left: 19.6891%; top: 32.5%;">上一页</a>
            
        </div>
        <audio id="audio" src="/imgs/oni.mp3"></audio>
    </div>
</div>
    
    <header class="navbar navbar-inverse" id="gal-header">
    <div class="container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed"
                    data-toggle="collapse" data-target=".bs-navbar-collapse"
                    aria-expanded="false">
                <span class="fa fa-lg fa-reorder"></span>
            </button>
            <a href="https://esyyes.github.io">
                
                <style>
                    #gal-header .navbar-brand {
                        height: 54px;
                        line-height: 24px;
                        font-size: 28px;
                        opacity: 1;
                        background-color: rgba(0,0,0,0);
                        text-shadow: 0 0 5px #fff,0 0 10px #fff,0 0 15px #fff,0 0 20px #228DFF,0 0 35px #228DFF,0 0 40px #228DFF,0 0 50px #228DFF,0 0 75px #228DFF;
                    }
                </style>
                <!-- 这里使用文字(navbar_text or config.title) -->
                <div class="navbar-brand">ESY</div>
                
            </a>
        </div>
        <div class="collapse navbar-collapse bs-navbar-collapse">
            <ul class="nav navbar-nav" id="menu-gal">
                
                
                <li class="">
                    <a href="/">
                        <i class="fa fa-home"></i>首页
                    </a>
                </li>
                
                
                
                <li class="">
                    <a href="/archives">
                        <i class="fa fa-archive"></i>归档
                    </a>
                </li>
                
                
                
                
                <li class="dropdown">
                    <!-- TODO 添加hover dropdown效果 -->
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown"
                       aria-haspopup="true" aria-expanded="false" data-hover="dropdown">
                        <i class="fa fa-list"></i>分类
                    </a>
                    <ul class="dropdown-menu">
                        
                        
                        <li>
                            <a href="/categories/py-study/">py_study</a>
                        </li>
                        
                        <li>
                            <a href="/categories/nlp/">nlp</a>
                        </li>
                        
                        <li>
                            <a href="/categories/Graduation-work/">Graduation work</a>
                        </li>
                        
                        <li>
                            <a href="/categories/work/">work</a>
                        </li>
                        
                        <li>
                            <a href="/categories/hexo/">hexo</a>
                        </li>
                        
                        <li>
                            <a href="/categories/hexo%E5%AE%8C%E5%96%84/">-hexo完善</a>
                        </li>
                        
                        
                        <li>
                            <a href="/categories">...</a>
                        </li>
                        
                        
                    </ul>
                </li>
                
                
                
                
                
                <li class="dropdown">
                    <!-- TODO 添加hover dropdown效果 -->
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown"
                       aria-haspopup="true" aria-expanded="false" data-hover="dropdown">
                        <i class="fa fa-tags"></i>标签
                    </a>
                    <ul class="dropdown-menu">
                        
                        
                        <li>
                            <a href="/tags/py-study/">py_study</a>
                        </li>
                        
                        <li>
                            <a href="/tags/nlp/">nlp</a>
                        </li>
                        
                        <li>
                            <a href="/tags/Graduation-work/">Graduation work</a>
                        </li>
                        
                        <li>
                            <a href="/tags/work/">work</a>
                        </li>
                        
                        <li>
                            <a href="/tags/hexo/">hexo</a>
                        </li>
                        
                        <li>
                            <a href="/tags/%E4%B8%AA%E4%BA%BA%E5%8D%9A%E5%AE%A2%E6%90%AD%E5%BB%BA/">-个人博客搭建</a>
                        </li>
                        
                        
                        <li>
                            <a href="/tags">...</a>
                        </li>
                        
                        
                    </ul>
                </li>
                
                
                
                
                <li class="">
                    <a href="/about">
                        <i class="fa fa-user"></i>关于我
                    </a>
                </li>
                
                
            </ul>
        </div>
    </div>
</header>
    <div id="gal-body">
        <div class="container">
            <div class="row">
                <div class="col-md-8 gal-right" id="mainstay">
                    
<article class="article well article-body" id="article">
    <div class="breadcrumb">
        <i class="fa fa-home"></i>
        <a href="https://esyyes.github.io">ESY</a>
        >
        <span>matlab中的插值</span>
    </div>
    <!-- 大型设备详细文章 -->
    <div class="hidden-xs">
        <div class="title-article">
            <h1>
                <a href="/2019/12/18/python%20work/matlab%E4%B8%AD%E7%9A%84%E6%8F%92%E5%80%BC/">matlab中的插值</a>
            </h1>
        </div>
        <div class="tag-article">
            
            <span class="label label-gal">
                <i class="fa fa-calendar"></i> 2019-12-18
            </span>
            
        </div>
    </div>
    <!-- 小型设备详细文章 -->
    <div class="visible-xs">
        <center>
            <div class="title-article">
                <h4>
                    <a href="/2019/12/18/python%20work/matlab%E4%B8%AD%E7%9A%84%E6%8F%92%E5%80%BC/">matlab中的插值</a>
                </h4>
            </div>
            <p>
                <i class="fa fa-calendar"></i> 2019-12-18
            </p>
            <p>
                
                
            </p>
        </center>
    </div>
    <div class="content-article">
        <h1 id="Matlab中的插值函数"><a href="#Matlab中的插值函数" class="headerlink" title="Matlab中的插值函数"></a>Matlab中的插值函数</h1><iframe frameborder="no" border="0" marginwidth="0" marginheight="0" width=330 height=86 src="//music.163.com/outchain/player?type=2&id=850775&auto=1&height=66"></iframe>
# interp1

<p>一维数据插值（表查找）</p>
<h2 id="语法"><a href="#语法" class="headerlink" title="语法"></a>语法</h2><figure class="highlight matlab"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">vq = interp1(x,v,xq)</span><br><span class="line">vq = interp1(x,v,xq,method)</span><br><span class="line">vq = interp1(x,v,xq,method,extrapolation)</span><br><span class="line">vq = interp1(v,xq)</span><br><span class="line">vq = interp1(v,xq,method)</span><br><span class="line">vq = interp1(v,xq,method,extrapolation)</span><br><span class="line">pp = interp1(x,v,method,<span class="string">&#x27;pp&#x27;</span>)</span><br></pre></td></tr></table></figure>



<h2 id="说明"><a href="#说明" class="headerlink" title="说明"></a>说明</h2><p><code>vq = interp1(x,v,xq)</code> 使用线性插值返回一维函数在特定查询点的插入值。向量 <code>x</code> 包含样本点，<code>v</code> 包含对应值 v(x)。向量 <code>xq</code> 包含查询点的坐标。</p>
<p>如果您有多个在同一点坐标采样的数据集，则可以将 <code>v</code> 以数组的形式进行传递。数组 <code>v</code> 的每一列都包含一组不同的一维样本值。</p>
<p><code>vq = interp1(x,v,xq,method)</code> 指定备选插值方法：<code>&#39;linear&#39;</code>、<code>&#39;nearest&#39;</code>、<code>&#39;next&#39;</code>、<code>&#39;previous&#39;</code>、<code>&#39;pchip&#39;</code>、<code>&#39;cubic&#39;</code>、<code>&#39;v5cubic&#39;</code>、<code>&#39;makima&#39;</code> 或 <code>&#39;spline&#39;</code>。默认方法为 <code>&#39;linear&#39;</code>。</p>
<p><code>vq = interp1(x,v,xq,method,extrapolation)</code> 用于指定外插策略，来计算落在 <code>x</code> 域范围外的点。如果希望使用 <code>method</code> 算法进行外插，可将 <code>extrapolation</code> 设置为 <code>&#39;extrap&#39;</code>。您也可以指定一个标量值，这种情况下，<code>interp1</code> 将为所有落在 <code>x</code> 域范围外的点返回该标量值。</p>
<p><code>vq = interp1(v,xq)</code> 返回插入的值，并假定一个样本点坐标默认集。默认点是从 <code>1</code> 到 <code>n</code> 的数字序列，其中 <code>n</code>取决于 <code>v</code> 的形状：</p>
<ul>
<li>当 v 是向量时，默认点是 <code>1:length(v)</code>。</li>
<li>当 v 是数组时，默认点是 <code>1:size(v,1)</code>。</li>
</ul>
<p>如果您不在意点之间的绝对距离，则可使用此语法。</p>
<p><code>vq = interp1(v,xq,method)</code> 指定备选插值方法中的任意一种，并使用默认样本点。</p>
<p><code>vq = interp1(v,xq,method,extrapolation)</code> 指定外插策略，并使用默认样本点。</p>
<p><code>pp = interp1(x,v,method,&#39;pp&#39;)</code> 使用 <code>method</code> 算法返回分段多项式形式的 v(x)。</p>
<p>根据需求确定的语法：</p>
<figure class="highlight matlab"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">vq = interp1(x,v,xq,method)</span><br></pre></td></tr></table></figure>



<h1 id="输入参数"><a href="#输入参数" class="headerlink" title="输入参数"></a>输入参数</h1><p><strong>x</strong> :样本点****</p>
<p><strong>x</strong> :样本点，指定为一行或一列实数向量。<code>x</code> 中的值必须各不相同。<code>x</code> 的长度必须符合以下要求之一：</p>
<ul>
<li>如果 <code>v</code> 为向量，则 <code>length(x)</code> 必须等于 <code>length(v)</code>。</li>
<li>如果 <code>v</code> 为数组，则 <code>length(x)</code> 必须等于 <code>size(v,1)</code></li>
</ul>
<p><strong>V:样本值</strong></p>
<p>样本值，指定为实数/复数向量、矩阵或数组。如果 <code>v</code> 是矩阵或数组，则每列包含单独的一组一维值。</p>
<p>如果 <code>v</code> 包含复数，则 <code>interp1</code> 将分别插入实部和虚部。</p>
<p><strong>xq: 查询点</strong></p>
<p>查询点，指定为实数标量、向量、矩阵或数组。</p>
<p><strong>method- 插值方法</strong></p>
<table>
<thead>
<tr>
<th align="left">方法</th>
<th align="left">说明</th>
<th align="left">连续性</th>
<th align="center">注释</th>
</tr>
</thead>
<tbody><tr>
<td align="left"><code>&#39;linear&#39;</code></td>
<td align="left">线性插值。在查询点插入的值基于各维中邻点网格点处数值的线性插值。这是默认插值方法。</td>
<td align="left">C0</td>
<td align="center">需要至少 2 个点。比最近邻点插值需要更多内存和计算时间。</td>
</tr>
<tr>
<td align="left"><code>&#39;nearest&#39;</code></td>
<td align="left">最近邻点插值。在查询点插入的值是距样本网格点最近的值。</td>
<td align="left">不连续</td>
<td align="center">需要至少 2 个点。最低内存要求最快计算时间</td>
</tr>
<tr>
<td align="left"><code>&#39;next&#39;</code></td>
<td align="left">下一个邻点插值。在查询点插入的值是下一个抽样网格点的值。</td>
<td align="left">不连续</td>
<td align="center">需要至少 2 个点。内存要求和计算时间与 <code>&#39;nearest&#39;</code> 相同</td>
</tr>
<tr>
<td align="left"><code>&#39;previous&#39;</code></td>
<td align="left">上一个邻点插值。在查询点插入的值是上一个抽样网格点的值。</td>
<td align="left">不连续</td>
<td align="center">需要至少 2 个点。内存要求和计算时间与 <code>&#39;nearest&#39;</code> 相同</td>
</tr>
<tr>
<td align="left"><code>&#39;pchip&#39;</code></td>
<td align="left">保形分段三次插值。在查询点插入的值基于邻点网格点处数值的保形分段三次插值。</td>
<td align="left">C1</td>
<td align="center">需要至少 4 个点。比 <code>&#39;linear&#39;</code> 需要更多内存和计算时间</td>
</tr>
<tr>
<td align="left"><code>&#39;cubic&#39;</code>注意<code>interp1(...,&#39;cubic&#39;)</code>的行为在以后的版本中会有所变化。在以后的版本中，此方法将执行三次卷积。</td>
<td align="left">与 <code>&#39;pchip&#39;</code> 相同。</td>
<td align="left">C1</td>
<td align="center">此方法目前返回与 <code>&#39;pchip&#39;</code> 相同的结果。</td>
</tr>
<tr>
<td align="left"><code>&#39;v5cubic&#39;</code></td>
<td align="left">用于 MATLAB® 5 的三次卷积。</td>
<td align="left">C1</td>
<td align="center">点之间的间距必须均匀。<code>&#39;cubic&#39;</code> 将在以后的版本中替代 <code>&#39;v5cubic&#39;</code>。</td>
</tr>
<tr>
<td align="left"><code>&#39;makima&#39;</code></td>
<td align="left">修改后的 Akima 三次 Hermite 插值。在查询点插入的值基于次数最大为 3 的多项式的分段函数。为防过冲，已改进 Akima 公式。</td>
<td align="left">C1</td>
<td align="center">需要至少 2 个点。产生的波动比 <code>&#39;spline&#39;</code> 小，但不像 <code>&#39;pchip&#39;</code> 那样急剧变平计算成本高于 <code>&#39;pchip&#39;</code>，但通常低于 <code>&#39;spline&#39;</code>内存要求与 <code>&#39;spline&#39;</code> 类似</td>
</tr>
<tr>
<td align="left"><code>&#39;spline&#39;</code></td>
<td align="left">使用非结终止条件的样条插值。在查询点插入的值基于各维中邻点网格点处数值的三次插值。</td>
<td align="left">C2</td>
<td align="center">需要至少 4 个点。比 <code>&#39;pchip&#39;</code> 需要更多内存和计算时间</td>
</tr>
</tbody></table>
<p>选择spline。参考文献：<strong>基于时频分析的心率变异性研究</strong></p>
<h2 id="输出函数"><a href="#输出函数" class="headerlink" title="输出函数"></a>输出函数</h2><p><strong>vq- 输出的插值</strong></p>
<p>插入的值，以标量、向量、矩阵或数组的形式返回。<code>vq</code> 的大小取决于 <code>v</code> 和 <code>xq</code> 的形状。</p>
<table>
<thead>
<tr>
<th align="left">v 的形状</th>
<th align="left">xq 的形状</th>
<th align="left">Vq 的大小</th>
<th align="center">示例</th>
</tr>
</thead>
<tbody><tr>
<td align="left">向量</td>
<td align="left">向量</td>
<td align="left"><code>size(xq)</code></td>
<td align="center">如果 <code>size(v) = [1 100]</code> 且 <code>size(xq) = [1 500]</code>， 则 <code>size(vq) = [1 500]</code>。</td>
</tr>
<tr>
<td align="left">向量</td>
<td align="left">矩阵  或 N 维数组</td>
<td align="left"><code>size(xq)</code></td>
<td align="center">如果 <code>size(v) = [1 100]</code> 且 <code>size(xq) = [50 30]</code>， 则 <code>size(vq) = [50 30]</code>。</td>
</tr>
<tr>
<td align="left">矩阵  或 N 维数组</td>
<td align="left">向量</td>
<td align="left"><code>[length(xq) size(v,2),...,size(v,n)]</code></td>
<td align="center">如果 <code>size(v) = [100 3]</code> 且 <code>size(xq) = [1 500]</code>， 则 <code>size(vq) = [500 3]</code>。</td>
</tr>
<tr>
<td align="left">矩阵  或 N 维数组</td>
<td align="left">矩阵  或 N 维数组</td>
<td align="left"><code>[size(xq,1),...,size(xq,n),... size(v,2),...,size(v,m)]</code></td>
<td align="center">如果 <code>size(v) = [4 5 6]</code> 且 <code>size(xq) = [2 3 7]</code>， 则 <code>size(vq) = [2 3 7 5 6]</code>。</td>
</tr>
</tbody></table>
<p><a target="_blank" rel="noopener" href="http://www.360doc.com/content/18/0201/11/12548572_726900990.shtml">http://www.360doc.com/content/18/0201/11/12548572_726900990.shtml</a></p>
<h2 id="参考代码："><a href="#参考代码：" class="headerlink" title="参考代码："></a>参考代码：</h2><figure class="highlight matlab"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br></pre></td><td class="code"><pre><span class="line">load ekg.mat; <span class="comment">%读入ecg信号</span></span><br><span class="line"></span><br><span class="line">[map,r,delay]=pan_tompkin(ecg,fs,<span class="number">0</span>);<span class="comment">% 利用pan_tomkin算法找到R点</span></span><br><span class="line"></span><br><span class="line">[a,l]=<span class="built_in">size</span>(r);</span><br><span class="line"></span><br><span class="line"><span class="keyword">for</span> <span class="built_in">i</span>=<span class="number">2</span>:l;</span><br><span class="line"></span><br><span class="line">t(<span class="built_in">i</span><span class="number">-1</span>)=r(<span class="built_in">i</span>)-r(<span class="built_in">i</span><span class="number">-1</span>); <span class="comment">%求出R-R间的时间值，即使HRV</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">end</span></span><br><span class="line"></span><br><span class="line">x=r(<span class="number">2</span>:<span class="number">19</span>);</span><br><span class="line"></span><br><span class="line">y=interp1(x,t,r(<span class="number">2</span>):<span class="number">1</span>:r(<span class="number">19</span>),<span class="string">&#x27;spline&#x27;</span>); <span class="comment">%利用插值法求出以原ecg信号的采样率fs的拟合函数</span></span><br><span class="line"></span><br><span class="line"><span class="built_in">plot</span>(y);<span class="built_in">hold</span> on,</span><br><span class="line"></span><br><span class="line"><span class="built_in">scatter</span>(r(<span class="number">2</span>:<span class="number">19</span>)-r(<span class="number">2</span>),t(<span class="number">1</span>:<span class="number">18</span>));</span><br></pre></td></tr></table></figure>



<h2 id="进行插值并实现重采样，代码如下："><a href="#进行插值并实现重采样，代码如下：" class="headerlink" title="进行插值并实现重采样，代码如下："></a>进行插值并实现重采样，代码如下：</h2><figure class="highlight matlab"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">%对其进行三次样本插值</span></span><br><span class="line">sRR = interp1(locs(<span class="number">2</span>:<span class="built_in">length</span>(locs),<span class="number">1</span>),RR, locs(<span class="number">2</span>):<span class="number">1</span>:locs(<span class="built_in">length</span>(locs)), <span class="string">&#x27;spline&#x27;</span>);</span><br><span class="line"></span><br><span class="line"><span class="comment">%利用散点图将图像进行标记</span></span><br><span class="line"><span class="built_in">figure</span>(<span class="number">5</span>)</span><br><span class="line"><span class="built_in">plot</span>(sRR);</span><br><span class="line"><span class="built_in">hold</span> on</span><br><span class="line"><span class="built_in">scatter</span>(locs(<span class="number">2</span>:<span class="built_in">length</span>(locs),<span class="number">1</span>) - locs(<span class="number">2</span>),RR(<span class="number">1</span>:<span class="built_in">length</span>(locs)<span class="number">-1</span>));</span><br><span class="line"></span><br><span class="line"><span class="comment">%原来的采样率为250Hz,进行重采样为2.4Hz，%输出为等间隔的数据信号</span></span><br><span class="line">VRR = resample(sRR, <span class="number">720</span>, <span class="number">74651</span>);</span><br><span class="line">VRR = VRR&#x27;;</span><br><span class="line">Fs = <span class="number">2.4</span>;</span><br><span class="line">N_RR = <span class="built_in">length</span>(VRR);<span class="comment">%采样数</span></span><br><span class="line">fen1 = N_RR / (<span class="number">60</span> * Fs);</span><br><span class="line">m = <span class="number">1</span> : N_RR;</span><br><span class="line">t = m / Fs;</span><br><span class="line"><span class="built_in">figure</span>(<span class="number">6</span>)</span><br><span class="line"><span class="built_in">plot</span>(t, VRR);</span><br><span class="line"></span><br><span class="line"><span class="comment">%对数据进行切片30S</span></span><br><span class="line">XRR = [];</span><br><span class="line"><span class="built_in">i</span> = <span class="number">1</span>;</span><br><span class="line"><span class="keyword">while</span> <span class="built_in">i</span> &lt;= <span class="number">10</span></span><br><span class="line"><span class="built_in">j</span> = <span class="number">1</span>;</span><br><span class="line">    <span class="keyword">while</span> <span class="built_in">j</span> &lt;= <span class="number">72</span></span><br><span class="line">        XRR(<span class="built_in">j</span>, <span class="built_in">i</span>) = VRR(<span class="built_in">j</span> * <span class="built_in">i</span>, <span class="number">1</span>); </span><br><span class="line">        <span class="built_in">j</span> = <span class="built_in">j</span> + <span class="number">1</span>;</span><br><span class="line">    <span class="keyword">end</span></span><br><span class="line">    <span class="built_in">i</span> = <span class="built_in">i</span> +<span class="number">1</span>;</span><br><span class="line"><span class="keyword">end</span></span><br></pre></td></tr></table></figure>



<p><img src="https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1576660259221&di=127d3ef16eaff007d35877ac99af1c4a&imgtype=0&src=http://b-ssl.duitang.com/uploads/item/201811/03/20181103144533_neboc.thumb.700_0.jpg"></p>

    </div>
</article>


                </div>
                <aside class="col-md-4 gal-left" id="sidebar">
    <!-- 此为sidebar的搜索框, 非搜索结果页面 -->
<aside id="sidebar-search">
    <div class="search hidden-xs" data-aos="fade-up" data-aos-duration="2000">
        <form class="form-inline clearfix" id="search-form" method="get"
              action="/search/index.html">
            <input type="text" name="s" class="form-control" id="searchInput" placeholder="搜索文章~" autocomplete="off">
            <button class="btn btn-danger btn-gal" type="submit">
                <i class="fa fa-search"></i>
            </button>
        </form>
    </div>
</aside>
    <aside id="sidebar-author">
    <div class="panel panel-gal" data-aos="flip-right" data-aos-duration="3000">
        <div class="panel-heading" style="text-align: center">
            <i class="fa fa-quote-left"></i>
            esy
            <i class="fa fa-quote-right"></i>
        </div>
        <div class="author-panel text-center">
            <img src="/imgs/avatar.jpg" width="140" height="140"
                 alt="个人头像" class="author-image">
            <p class="author-description"><p>esy</p>
</p>
        </div>
    </div>
</aside>
    
    <aside id="sidebar-recent_comments">
    <div class="panel panel-gal recent hidden-xs" data-aos="fade-up" data-aos-duration="2000">
        <div class="panel-heading">
            <i class="fa fa-comments"></i>
            最新评论
            <i class="fa fa-times-circle panel-remove"></i>
            <i class="fa fa-chevron-circle-up panel-toggle"></i>
        </div>
        <ul class="list-group list-group-flush"></ul>
    </div>
</aside>
    
    <!-- 要配置好leancloud才能开启此小工具 -->
    
    
    <aside id="sidebar-recent_posts">
    <div class="panel panel-gal recent hidden-xs" data-aos="fade-up" data-aos-duration="2000">
        <div class="panel-heading">
            <i class="fa fa-refresh"></i>
            近期文章
            <i class="fa fa-times-circle panel-remove"></i>
            <i class="fa fa-chevron-circle-up panel-toggle"></i>
        </div>
        <ul class="list-group list-group-flush">
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/11/05/python%20work/%E6%9C%80%E5%B0%8F%E4%BA%8C%E4%B9%98%E6%B3%95/">最小二乘法</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/11/05/python%20work/%E7%BB%9F%E8%AE%A1%E5%AD%A6%E4%B9%A0-%E7%AC%AC%E4%B8%80%E7%AB%A0/">统计学习--第一章</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/11/04/python%20work/hello-world/">Hello World</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/11/03/python%20work/%E5%88%86%E7%B1%BB%E6%A8%A1%E5%9E%8B%E7%9A%84%E8%AF%84%E4%BC%B0%E6%8C%87%E6%A0%87/">分类模型的评估指标</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/10/21/python%20work/10-21-%E7%88%AC%E8%99%AB%E5%9F%BA%E7%A1%80/">10-21 爬虫基础</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/09/25/python%20work/CRF%E7%9A%84%E6%95%B4%E4%BD%93%E6%B5%81%E7%A8%8B%E7%BB%93%E6%9E%9C/">CRF的整体流程结果</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/09/25/python%20work/nlp-crf%E6%A8%A1%E5%9E%8B/">nlp_crf模型</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/09/25/python%20work/%E6%95%B0%E5%AD%A6%E5%BB%BA%E6%A8%A1%E9%97%AE%E9%A2%983/">数学建模问题3</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/09/25/python%20work/%E6%95%B0%E5%AD%A6%E5%BB%BA%E6%A8%A1%E9%97%AE%E9%A2%982/">数学建模问题2</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/09/25/python%20work/%E6%95%B0%E5%AD%A6%E5%BB%BA%E6%A8%A1%E9%97%AE%E9%A2%981/">数学建模问题1</a>
                </span>
            </li>
            
        </ul>
    </div>
</aside>
    
    
    <aside id="sidebar-rand_posts">
    <div class="panel panel-gal recent hidden-xs" data-aos="fade-up" data-aos-duration="2000">
        <div class="panel-heading">
            <i class="fa fa-refresh"></i>
            随机文章
            <i class="fa fa-times-circle panel-remove"></i>
            <i class="fa fa-chevron-circle-up panel-toggle"></i>
        </div>
        <ul class="list-group list-group-flush">
            
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/06/08/python%20work/ECG%E4%BF%A1%E5%8F%B7%E8%AF%BB%E5%8F%96/">ECG信号读取</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2019/11/24/python%20work/pyhon%E5%9F%BA%E7%A1%80-%E6%A8%A1%E5%9D%97/">pyhon基础--模块</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/05/26/python%20work/python-%E5%85%A5%E9%97%A8%E5%A4%8D%E4%B9%A0%E4%B9%8B%E5%BC%82%E5%B8%B8/">python-入门复习之异常</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/05/26/python%20work/python-%E5%85%A5%E9%97%A8%E5%A4%8D%E4%B9%A0%E4%B9%8B%E6%96%87%E4%BB%B6%E8%AF%BB%E5%8F%96/">python_入门复习之文件读取</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/05/26/python%20work/python-%E5%85%A5%E9%97%A8%E5%A4%8D%E4%B9%A0%E9%9D%A2%E5%90%91%E5%AF%B9%E8%B1%A1/">python-入门复习面向对象</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/09/02/python%20work/tensorflow2-3%E7%89%88%E6%9C%AC%E5%AE%89%E8%A3%85/">tensorflow2.3版本安装</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/08/22/python%20work/%E9%87%8D%E6%96%B0%E8%BF%9B%E8%A1%8C%E7%89%B9%E5%BE%81%E7%AD%9B%E9%80%89/">重新进行特征筛选</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/05/28/python%20work/%E9%9D%A2%E5%90%91%E5%AF%B9%E8%B1%A1%E7%89%88%E5%AD%A6%E5%91%98%E7%AE%A1%E7%90%86%E7%B3%BB%E7%BB%9F/">面向对象版学员管理系统</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/06/08/python%20work/HRV%E7%9A%8430s%E7%89%B9%E5%BE%81%E6%8F%90%E5%8F%96/">HRV的30s特征提取</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/07/27/python%20work/%E6%A0%B7%E6%9C%AC%E6%95%B0%E6%8D%AE%E7%9A%84%E7%94%9F%E6%88%90/">样本数据的生成</a>
                </span>
            </li>
            
        </ul>
    </div>
</aside>
    
    
    <aside id="gal-sets">
        <div class="panel panel-gal hidden-xs" data-aos="fade-up" data-aos-duration="2000">
            <ul class="nav nav-pills pills-gal">

                
                <li>
                    <a href="/2019/12/18/python%20work/matlab%E4%B8%AD%E7%9A%84%E6%8F%92%E5%80%BC/index.html#sidebar-tags" data-toggle="tab" id="tags-tab">热门标签</a>
                </li>
                
                
                <li>
                    <a href="/2019/12/18/python%20work/matlab%E4%B8%AD%E7%9A%84%E6%8F%92%E5%80%BC/index.html#sidebar-friend-links" data-toggle="tab" id="friend-links-tab">友情链接</a>
                </li>
                
                
                <li>
                    <a href="/2019/12/18/python%20work/matlab%E4%B8%AD%E7%9A%84%E6%8F%92%E5%80%BC/index.html#sidebar-links" data-toggle="tab" id="links-tab">个人链接</a>
                </li>
                
            </ul>
            <div class="tab-content">
                
                <div class="cloud-tags tab-pane nav bs-sidenav fade" id="sidebar-tags">
    
    <a href="/tags/py-study/" style="font-size: 17.000567020673223px;" class="tag-cloud-link">py_study</a>
    
    <a href="/tags/nlp/" style="font-size: 18.060728985242527px;" class="tag-cloud-link">nlp</a>
    
    <a href="/tags/Graduation-work/" style="font-size: 11.746524356165441px;" class="tag-cloud-link">Graduation work</a>
    
    <a href="/tags/work/" style="font-size: 12.570713003040858px;" class="tag-cloud-link">work</a>
    
    <a href="/tags/hexo/" style="font-size: 8.40994045969121px;" class="tag-cloud-link">hexo</a>
    
    <a href="/tags/%E4%B8%AA%E4%BA%BA%E5%8D%9A%E5%AE%A2%E6%90%AD%E5%BB%BA/" style="font-size: 13.507706800089615px;" class="tag-cloud-link">-个人博客搭建</a>
    
    <a href="/tags/malab-%E6%AF%95%E4%B8%9A/" style="font-size: 13.326678345284042px;" class="tag-cloud-link">-malab -毕业</a>
    
    <a href="/tags/python-%E4%BA%BA%E5%B7%A5%E6%99%BA%E8%83%BD/" style="font-size: 19.6195124867302px;" class="tag-cloud-link">-python -人工智能</a>
    
    <a href="/tags/python/" style="font-size: 13.811917769176581px;" class="tag-cloud-link">python</a>
    
    <a href="/tags/python/" style="font-size: 12.01174190014493px;" class="tag-cloud-link">-python</a>
    
    <a href="/tags/mathematical-modeling/" style="font-size: 15.883505141066085px;" class="tag-cloud-link">mathematical modeling</a>
    
    <a href="/tags/statistical-learning/" style="font-size: 8.089265326204812px;" class="tag-cloud-link">statistical learning</a>
    
</div>
                
                
                <div class="friend-links tab-pane nav bs-sidenav fade" id="sidebar-friend-links">
    
    <li>
        <a href="http://kdays.net/days/" target="_blank">KDays Forum</a>
    </li>
    
    <li>
        <a href="http://www.gal123.com/" target="_blank">绅士导航♂</a>
    </li>
    
    <li>
        <a href="http://www.moe123.com/" target="_blank">萌导航</a>
    </li>
    
</div>
                
                
                <div class="links tab-pane nav bs-sidenav fade" id="sidebar-links">
    
    <li>
        <a href="https://github.com/ZEROKISEKI/" target="_blank">Github</a>
    </li>
    
    <li>
        <a href="https://coding.net/u/SORA1" target="_blank">Coding</a>
    </li>
    
    <li>
        <a href="https://www.zhihu.com/people/aonosora/activities" target="_blank">知乎</a>
    </li>
    
</div>
                
            </div>
        </div>
    </aside>
    
</aside>
            </div>
        </div>
    </div>
    <footer id="gal-footer">
    <div class="container">
        Copyright © 2018 esy Powered by <a href="https://hexo.io/" target="_blank">Hexo</a>.&nbsp;Theme by <a href="https://github.com/ZEROKISEKI" target="_blank">AONOSORA</a>
    </div>
</footer>

<!-- 回到顶端 -->
<div id="gal-gotop">
    <i class="fa fa-angle-up"></i>
</div>
</body>

<script src="/js/activate-power-mode.js"></script>

<script>

    // 配置highslide
	hs.graphicsDir = '/js/highslide/graphics/'
    hs.outlineType = "rounded-white";
    hs.dimmingOpacity = 0.8;
    hs.outlineWhileAnimating = true;
    hs.showCredits = false;
    hs.captionEval = "this.thumb.alt";
    hs.numberPosition = "caption";
    hs.align = "center";
    hs.transitions = ["expand", "crossfade"];
    hs.lang.number = '共%2张图, 当前是第%1张';
    hs.addSlideshow({
      interval: 5000,
      repeat: true,
      useControls: true,
      fixedControls: "fit",
      overlayOptions: {
        opacity: 0.75,
        position: "bottom center",
        hideOnMouseOut: true
      }
    })

    // 初始化aos
    AOS.init({
      duration: 1000,
      delay: 0,
      easing: 'ease-out-back'
    });

</script>
<script>
	POWERMODE.colorful = 'true';    // make power mode colorful
	POWERMODE.shake = 'true';       // turn off shake
	// TODO 这里根据具体情况修改
	document.body.addEventListener('input', POWERMODE);
</script>
<script>
    window.slideConfig = {
      prefix: '/imgs/slide/background',
      ext: 'jpg',
      maxCount: '6'
    }
</script>

<script src="/js/hs.js"></script>
<script src="/js/blog.js"></script>



<script src="/js/oni.js"></script>




</html>